package me.shenfan.updateapp.sample;

import android.app.Application;
import android.content.Context;

import com.squareup.leakcanary.LeakCanary;


/**
 * Created by Administrator on 2018/7/17.
 */

public class MyApp extends Application {

    public static Context context;

    @Override
    public void onCreate() {
        super.onCreate();
        this.context = this;
        initLeakCanary(); //初始化LeakCanary
    }

    /**
     * 初始化LeakCanary
     */
    private void initLeakCanary() {
        //初始化LeakCanary
        if (LeakCanary.isInAnalyzerProcess(this)) {
            return;
        }
        LeakCanary.install(this);
    }

}
